﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class User_EditCourse : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Update(object sender, EventArgs e)
    {
        String name = (String)txtNameS.Text;
        int teacher_id = Int32.Parse(DropDownList1.SelectedItem.Value);
        String cost = (String)txtCost.Text;
        String ders = (String)txtDers.Text;
        SqlDataSource1.UpdateCommand = "update courses set course_name = '" + name + "'" + ",teacher_id = " + teacher_id +", cost= '"+ cost+"', description = '"+ders+"' where id = 1";
        SqlDataSource1.Update();
    }
}